package com.kwt.learn.array;

public class Array01 {
    public static void main(String[] args) {
        //声明一个数组
        int[] array = new int[3];
        array[0] = 10;
        array[1] = 100;
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);

        System.out.println("-----------------------------");
        array[0] = 1;
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);


        /**
         * 往数组的array[0]赋值两次数据，后一次的数据会把上次的数据覆盖
         */


        array[2]=100;
        System.out.println("+++++++++++++++++++++++++++++");
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);
    }
}
